package com.wg.java;

import com.wg.java.model.Student;
import com.wg.java.service.StudentService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
//		普通java工程
		ConfigurableApplicationContext configurableApplicationContext = SpringApplication.run(DemoApplication.class, args);
//		默认是类的首字母小写
		StudentService studentServiceImpl = (StudentService) configurableApplicationContext.getBean("studentServiceImpl");
		Student student = studentServiceImpl.sayHello();
		System.out.println(student.getAge());
	}

}
